<ion-header>
  <ion-toolbar>
    <ion-title>选择目录</ion-title>
    <ion-chip color="secondary">
      <ion-label color="dark" (click)="path = '/'">/</ion-label>
    </ion-chip>
    <ion-chip color="secondary" *ngFor="let p of paths;let i = index;">
      <ion-label color="dark" (click)="open(i)">{{ p }}</ion-label>
    </ion-chip>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-list>
    <ion-item *ngFor="let d of dirs" [color]="selected==d.name?'primary':''" button
    (click)="select(d.name)">
      <ion-label>
        {{ d.name }}
      </ion-label>
      <ion-note slot="end">
        {{ d.formatTime }}
      </ion-note>
    </ion-item>
  </ion-list>
</ion-content>

<ion-footer>
  <ion-toolbar>
    <ion-button slot="start" color="secondary" fill="outline" (click)="close()">取消</ion-button>
    <ion-button slot="end" color="primary" fill="outline" [disabled]="!selected" (click)="ok()">确定</ion-button>
  </ion-toolbar>
</ion-footer>
